<template>
    <div class="qilin-QilinCard">
        <el-card>
            <div slot="header">
                <span>{{ownCardConfig.title}}</span>
            </div>
            <div class="el-card-content">
                <slot></slot>
            </div>
        </el-card>
    </div>
</template>
<script>
export default {
    props:{
        cardConfig:{
            type:Object
        }
    },
    data(){
        return {
            ownCardConfig:{
                title:"标题"
            }
        }
    },
    watch:{
        cardConfig:{
            handler(newValue,oldValue){
                this.initOwnCardConfig(newValue);
            },
            deep:true,
            immediate:true
        }
    },
    methods:{
        initOwnCardConfig(target){
            this.ownCardConfig=this.$QilinUtils.deepCopy(target,this.ownCardConfig);
        }
    }
}
</script>
<style lang="less" scoped>
.qilin-QilinCard{
    // margin-bottom:15px;
}
</style>